package fatboy.hypeerweb;

import static org.junit.Assert.assertEquals;

import org.junit.Test;



public class TestConnection {
	/**
	 * test constructor
	 */
	@Test
	public void testConstructor(){
		Connection proven = new Connection();
		proven.addNode("first");
		Connection test = new Connection(proven.addNode("second"));
		Node testNode = test.getAllNodes().get(0);
		assertEquals(1,testNode.getNeighbors().size());
		proven.addNode("another");
		assertEquals(2,testNode.getFoldPointer().hashCode());
		proven.toString();
		assertEquals(testNode.toString(), test.toString());
	}
}
